Technical Q&A

TB44 - Unpopped Popup Menus and Mac OS 8.5 (17-December-98)


Q: My menu definition function ('MDEF') supports messages 4 and 5, which allow it to draw itself in the "unpopped" state in a popup menu control. Under Mac OS 8.5, my MDEF no longer receives these messages. What gives?

A: In versions 7.0 through 8.1 of Mac OS, the popup menu control definition function would send two messages, mCalcItemMsg and mDrawItemMsg, to the MDEF used by the menu in a popup menu control. In order to maintain a uniform appearance for popup menus, it was deemed necessary to remove the support for these messages in Mac OS 8.5.

The most common use of this facility seems to have been to put color swatches into an "unpopped" menu. It is, however, possible to display color swatches without a custom MDEF.

One way is illustrated by the new sample "ColorPopUpMenus", available on the Tool Chest Edition of the Developer CD Series.

Another way to work with icons in menu items is via the function SetMenuItemIconHandle.

Further Reference:

Inside Macintosh: Menu Manager
Inside Macintosh: Control Manager
Human Interface Guidelines


-- Pete Gontier
Worldwide Developer Technical Support

Technical Q&As | Contents
Previous Question | Next Question

To contact us, please use the Contact Us page.